home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / locale / nsICollation.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  209 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsICollation.idl
  3.  */
  4.  
  5. #ifndef __gen_nsICollation_h__
  6. #define __gen_nsICollation_h__
  7.  
  8.  
  9. #ifndef __gen_nsILocale_h__
  10. #include "nsILocale.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsICollation; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsICollationFactory */
  21. #define NS_ICOLLATIONFACTORY_IID_STR "04971e14-d6b3-4ada-8cbb-c3a13842b349"
  22.  
  23. #define NS_ICOLLATIONFACTORY_IID \
  24.   {0x04971e14, 0xd6b3, 0x4ada, \
  25.     { 0x8c, 0xbb, 0xc3, 0xa1, 0x38, 0x42, 0xb3, 0x49 }}
  26.  
  27. class NS_NO_VTABLE nsICollationFactory : public nsISupports {
  28.  public: 
  29.  
  30.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOLLATIONFACTORY_IID)
  31.  
  32.   /* nsICollation CreateCollation (in nsILocale locale); */
  33.   NS_IMETHOD CreateCollation(nsILocale *locale, nsICollation **_retval) = 0;
  34.  
  35. };
  36.  
  37. /* Use this macro when declaring classes that implement this interface. */
  38. #define NS_DECL_NSICOLLATIONFACTORY \
  39.   NS_IMETHOD CreateCollation(nsILocale *locale, nsICollation **_retval); 
  40.  
  41. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  42. #define NS_FORWARD_NSICOLLATIONFACTORY(_to) \
  43.   NS_IMETHOD CreateCollation(nsILocale *locale, nsICollation **_retval) { return _to CreateCollation(locale, _retval); } 
  44.  
  45. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  46. #define NS_FORWARD_SAFE_NSICOLLATIONFACTORY(_to) \
  47.   NS_IMETHOD CreateCollation(nsILocale *locale, nsICollation **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateCollation(locale, _retval); } 
  48.  
  49. #if 0
  50. /* Use the code below as a template for the implementation class for this interface. */
  51.  
  52. /* Header file */
  53. class nsCollationFactory : public nsICollationFactory
  54. {
  55. public:
  56.   NS_DECL_ISUPPORTS
  57.   NS_DECL_NSICOLLATIONFACTORY
  58.  
  59.   nsCollationFactory();
  60.  
  61. private:
  62.   ~nsCollationFactory();
  63.  
  64. protected:
  65.   /* additional members */
  66. };
  67.  
  68. /* Implementation file */
  69. NS_IMPL_ISUPPORTS1(nsCollationFactory, nsICollationFactory)
  70.  
  71. nsCollationFactory::nsCollationFactory()
  72. {
  73.   /* member initializers and constructor code */
  74. }
  75.  
  76. nsCollationFactory::~nsCollationFactory()
  77. {
  78.   /* destructor code */
  79. }
  80.  
  81. /* nsICollation CreateCollation (in nsILocale locale); */
  82. NS_IMETHODIMP nsCollationFactory::CreateCollation(nsILocale *locale, nsICollation **_retval)
  83. {
  84.     return NS_ERROR_NOT_IMPLEMENTED;
  85. }
  86.  
  87. /* End of implementation class template. */
  88. #endif
  89.  
  90.  
  91. /* starting interface:    nsICollation */
  92. #define NS_ICOLLATION_IID_STR "b0132cc0-3786-4557-9874-910d7def5f93"
  93.  
  94. #define NS_ICOLLATION_IID \
  95.   {0xb0132cc0, 0x3786, 0x4557, \
  96.     { 0x98, 0x74, 0x91, 0x0d, 0x7d, 0xef, 0x5f, 0x93 }}
  97.  
  98. class NS_NO_VTABLE nsICollation : public nsISupports {
  99.  public: 
  100.  
  101.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOLLATION_IID)
  102.  
  103.   enum { kCollationStrengthDefault = 0 };
  104.  
  105.   enum { kCollationCaseInsensitiveAscii = 1 };
  106.  
  107.   enum { kCollationAccentInsenstive = 2 };
  108.  
  109.   enum { kCollationCaseSensitive = 0 };
  110.  
  111.   enum { kCollationCaseInSensitive = 3 };
  112.  
  113.   /* void initialize (in nsILocale locale); */
  114.   NS_IMETHOD Initialize(nsILocale *locale) = 0;
  115.  
  116.   /* long compareString (in long strength, in AString string1, in AString string2); */
  117.   NS_IMETHOD CompareString(PRInt32 strength, const nsAString & string1, const nsAString & string2, PRInt32 *_retval) = 0;
  118.  
  119.   /* [noscript] void allocateRawSortKey (in long strength, in AString stringIn, [array, size_is (outLen)] out octet key, out unsigned long outLen); */
  120.   NS_IMETHOD AllocateRawSortKey(PRInt32 strength, const nsAString & stringIn, PRUint8 **key, PRUint32 *outLen) = 0;
  121.  
  122.   /* [noscript] long compareRawSortKey ([array, size_is (len1), const] in octet key1, in unsigned long len1, [array, size_is (len2), const] in octet key2, in unsigned long len2); */
  123.   NS_IMETHOD CompareRawSortKey(const PRUint8 *key1, PRUint32 len1, const PRUint8 *key2, PRUint32 len2, PRInt32 *_retval) = 0;
  124.  
  125. };
  126.  
  127. /* Use this macro when declaring classes that implement this interface. */
  128. #define NS_DECL_NSICOLLATION \
  129.   NS_IMETHOD Initialize(nsILocale *locale); \
  130.   NS_IMETHOD CompareString(PRInt32 strength, const nsAString & string1, const nsAString & string2, PRInt32 *_retval); \
  131.   NS_IMETHOD AllocateRawSortKey(PRInt32 strength, const nsAString & stringIn, PRUint8 **key, PRUint32 *outLen); \
  132.   NS_IMETHOD CompareRawSortKey(const PRUint8 *key1, PRUint32 len1, const PRUint8 *key2, PRUint32 len2, PRInt32 *_retval); 
  133.  
  134. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  135. #define NS_FORWARD_NSICOLLATION(_to) \
  136.   NS_IMETHOD Initialize(nsILocale *locale) { return _to Initialize(locale); } \
  137.   NS_IMETHOD CompareString(PRInt32 strength, const nsAString & string1, const nsAString & string2, PRInt32 *_retval) { return _to CompareString(strength, string1, string2, _retval); } \
  138.   NS_IMETHOD AllocateRawSortKey(PRInt32 strength, const nsAString & stringIn, PRUint8 **key, PRUint32 *outLen) { return _to AllocateRawSortKey(strength, stringIn, key, outLen); } \
  139.   NS_IMETHOD CompareRawSortKey(const PRUint8 *key1, PRUint32 len1, const PRUint8 *key2, PRUint32 len2, PRInt32 *_retval) { return _to CompareRawSortKey(key1, len1, key2, len2, _retval); } 
  140.  
  141. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  142. #define NS_FORWARD_SAFE_NSICOLLATION(_to) \
  143.   NS_IMETHOD Initialize(nsILocale *locale) { return !_to ? NS_ERROR_NULL_POINTER : _to->Initialize(locale); } \
  144.   NS_IMETHOD CompareString(PRInt32 strength, const nsAString & string1, const nsAString & string2, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CompareString(strength, string1, string2, _retval); } \
  145.   NS_IMETHOD AllocateRawSortKey(PRInt32 strength, const nsAString & stringIn, PRUint8 **key, PRUint32 *outLen) { return !_to ? NS_ERROR_NULL_POINTER : _to->AllocateRawSortKey(strength, stringIn, key, outLen); } \
  146.   NS_IMETHOD CompareRawSortKey(const PRUint8 *key1, PRUint32 len1, const PRUint8 *key2, PRUint32 len2, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CompareRawSortKey(key1, len1, key2, len2, _retval); } 
  147.  
  148. #if 0
  149. /* Use the code below as a template for the implementation class for this interface. */
  150.  
  151. /* Header file */
  152. class nsCollation : public nsICollation
  153. {
  154. public:
  155.   NS_DECL_ISUPPORTS
  156.   NS_DECL_NSICOLLATION
  157.  
  158.   nsCollation();
  159.  
  160. private:
  161.   ~nsCollation();
  162.  
  163. protected:
  164.   /* additional members */
  165. };
  166.  
  167. /* Implementation file */
  168. NS_IMPL_ISUPPORTS1(nsCollation, nsICollation)
  169.  
  170. nsCollation::nsCollation()
  171. {
  172.   /* member initializers and constructor code */
  173. }
  174.  
  175. nsCollation::~nsCollation()
  176. {
  177.   /* destructor code */
  178. }
  179.  
  180. /* void initialize (in nsILocale locale); */
  181. NS_IMETHODIMP nsCollation::Initialize(nsILocale *locale)
  182. {
  183.     return NS_ERROR_NOT_IMPLEMENTED;
  184. }
  185.  
  186. /* long compareString (in long strength, in AString string1, in AString string2); */
  187. NS_IMETHODIMP nsCollation::CompareString(PRInt32 strength, const nsAString & string1, const nsAString & string2, PRInt32 *_retval)
  188. {
  189.     return NS_ERROR_NOT_IMPLEMENTED;
  190. }
  191.  
  192. /* [noscript] void allocateRawSortKey (in long strength, in AString stringIn, [array, size_is (outLen)] out octet key, out unsigned long outLen); */
  193. NS_IMETHODIMP nsCollation::AllocateRawSortKey(PRInt32 strength, const nsAString & stringIn, PRUint8 **key, PRUint32 *outLen)
  194. {
  195.     return NS_ERROR_NOT_IMPLEMENTED;
  196. }
  197.  
  198. /* [noscript] long compareRawSortKey ([array, size_is (len1), const] in octet key1, in unsigned long len1, [array, size_is (len2), const] in octet key2, in unsigned long len2); */
  199. NS_IMETHODIMP nsCollation::CompareRawSortKey(const PRUint8 *key1, PRUint32 len1, const PRUint8 *key2, PRUint32 len2, PRInt32 *_retval)
  200. {
  201.     return NS_ERROR_NOT_IMPLEMENTED;
  202. }
  203.  
  204. /* End of implementation class template. */
  205. #endif
  206.  
  207.  
  208. #endif /* __gen_nsICollation_h__ */
  209.